﻿namespace CertApply.Component
{
    public partial class FormItem : UserControl
    {
        private string _key = string.Empty;
        private bool _isSecret = false;
        public FormItem()
        {
            InitializeComponent();
        }

        public string DisplayName
        {
            get
            {
                return this.lab_Title.Text;
            }
            set
            {
                this.lab_Title.Text = value;
            }
        }
        public string Key
        {
            get
            {
                return _key;
            }
            set
            {
                _key = value;
            }
        }
        public bool IsSecret
        {
            get
            {
                return _isSecret;
            }
            set
            {
                _isSecret = value;
            }
        }
        public string Value
        {
            get
            {
                return txt_value.Text;
            }
            set
            {
                txt_value.Text = value;
            }
        }
        private void FormItem_Resize(object sender, EventArgs e)
        {
            txt_value.Width = Width - 5;
        }
    }
}
